//
//  DLWebsViewController.h
//  DL-DraftAPP
//
//  Created by 李月林 on 16/9/27.
//  Copyright © 2016年 liliang. All rights reserved.
//

#import "DLBaseViewController.h"
#import <WebKit/WebKit.h>
#import <DGGWebBridge/WKWebViewJavascriptBridge.h>

/**
 * 该类为访问网页基础类，如网页没有与原生交互，可直接使用
 * 如有交互，请使用JSBridge封装类或者Cordova封装类
 * 1、JSBridge封装类：DLCommonWebViewController
 * 2、Cordova封装类：DLBaseWebViewController
 */
@interface DLWebsViewController : DLBaseViewController<WKNavigationDelegate,WKUIDelegate>

@property (copy,nonatomic)NSString *urlstr;
@property (assign,nonatomic)BOOL isWhiteNav;//导航是否为白色
@property (assign,nonatomic)BOOL isHaveTitle;
@property (assign,nonatomic)BOOL isHideNav;//隐藏导航栏
@property (assign,nonatomic)BOOL isShare;
@property (nonatomic, assign) BOOL isDownload;
@property (nonatomic, copy) NSString *downloadPath;
@property (nonatomic, copy) void(^downloadBlock)(void);
@property (nonatomic, assign) BOOL isSetTitleLength;//控制当导航栏字数超过10时展示10个字

@property (nonatomic, strong) UIImage *leftBackImg;//返回按钮 默认白色返回键

@property (nonatomic, assign) BOOL isHaveRightButton;
@property (nonatomic, strong) NSString *rightButtonName;
@property (nonatomic, copy) void(^rightButtonBlock)(void);

@property (nonatomic, copy) void(^jsBridgeRegisteredBlock)(void);
@property (nonatomic,strong)UIActivityIndicatorView * aiv;
@property (nonatomic, strong) WKWebView *webView;
@property (nonatomic,copy)NSString *emptyTitle;//如果网页标题为空  取的默认标题
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation;
- (void)back;

@end
